NAME="{{item}}"
BOOTPROTO="none"
NM_CONTROLLED=yes
{% if item == "enc900" %}
SUBCHANNELS="0.0.0900,0.0.0901,0.0.0902"
NETTYPE="qeth"
OPTIONS="layer2=1 portno=0"
{% endif %}
{% if item == "eth0" or item == "enc900" %}
GATEWAY="{{gw}}"
DOMAIN="phx2.fedoraproject.org vpn.fedoraproject.org fedoraproject.org"
DNS1="{{ dns1 }}"
DNS2="{{ dns2 }}"
{% endif %}
HWADDR="{{ hostvars[inventory_hostname]['ansible_' + item]['macaddress']|upper }}"
{% if item in ansible_ifcfg_disabled %}
ONBOOT="no"
{% else %}
IPADDR="{{ hostvars[inventory_hostname][item + '_ip'] }}"
NETMASK="{{ hostvars[inventory_hostname][item + '_nm'] }}"
ONBOOT="yes"
{% endif %}
TYPE="Ethernet"
DEVICE="{{item}}"
{% for line in if_uuid.stdout_lines %}
{% if line.split()[0] == item %}
UUID="{{ line.split()[1] }}"
{% endif %}
{% endfor %}
{% if has_ipv6 is defined %}
IPV6INIT=yes
IPV6ADDR_SECONDARIES="{{ hostvars[inventory_hostname][item + '_ipv6'] }}"
IPV6_ROUTER=no
IPV6_AUTOCONF=no
IPV6_DEFAULTDEV={{item}}
IPV6_DEFAULTGW={{ hostvars[inventory_hostname][item + '_ipv6_gw'] }}
IPV6_MTU=1280
{% endif %}
{% if hostvars[inventory_hostname][item + '_secondary_ip'] is defined %}
IPADDR1="{{ hostvars[inventory_hostname][item + '_secondary_ip'] }}"
{% endif %}
